//
// Created by ziya on 2020/8/30.
//

#ifndef CPP_MEMORY_POOL_MEMORYCELL_H
#define CPP_MEMORY_POOL_MEMORYCELL_H

#include "common.h"

class MemoryCell {

private:
    int     m_start;
    int     m_end;
    int     m_size;

public:
    MemoryCell();
    MemoryCell(int start, int size);
    ~MemoryCell();

public:
    int getStart();
    int getEnd();
    int getSize();

    MemoryCell* incStart(int step);
    MemoryCell* decStart(int step);
    MemoryCell* incSize(int step);
    MemoryCell* decSize(int step);

public:
    void toString();
    void toString(string msg);
};


#endif //CPP_MEMORY_POOL_MEMORYCELL_H
